<template>
	<view class="success">
		<view class="u-content">
			<image src="@/static/my/yes.png" mode=""></image>
		</view>
		<view class="title">
			{{name}}
		</view>
		<view class="btn-succss">
			<But @tap.stop="goBack" :text="title"></But>
		</view>
	</view>
	</view>
</template>

<script>
	import But from "@/components/Button/index.vue"
	export default {
		data() {
			return {
				title: '',
				name: ''
			}
		},
		components: {
			But,
		},
		methods: {
			goBack() {
				console.log(this.name,'name')
				if(this.name == '重置完成'){
					uni.navigateTo({
						url: '/pages/bind/login'
					})
				}else{
					uni.switchTab({
						url:'/pages/tabBar/myIndex'
					})
				}
			}
		},
		onLoad(res) {
			this.title = res ? res.title : ''
			this.name = this.title != '重置完成' ? '获取报价成功' : ''
		}
	}
</script>

<style lang="scss" scoped>
	.success {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.u-content {
			margin-top: 200rpx;

			image {
				width: 300rpx;
				height: 300rpx;
			}
		}

		.title {
			color: #58B99D;
			margin-top: 50rpx;
		}

		.btn-succss {
			margin-top: 80rpx;
			width: 58%;
		}
	}
</style>
